package com.czd.support.service;

import org.springframework.stereotype.Service;

import com.czd.base.model.Paginate;
import com.czd.base.service.BaseService;
import com.czd.support.model.News;

/**
 * 新闻业务类
 * @author Jun.Yang
 *
 */
@Service
public class NewsService extends BaseService<News> {
	public boolean insert(News news) {
		return this.insert(sqlId("insert"), news);
	}
	
	public boolean update(News news) {
		return this.update(sqlId("update"), news);
	}
	
	public boolean delete(int id) {
		return this.delete(sqlId("delete"), id);
	}
	
	public News findById(int id) {
		return this.selectOneById(sqlId("findById"), id);
	}
	
	public Paginate queryForPage(News news) {
		return this.queryForPaginate(sqlId("queryForPage"), news);
	}
}
